package com.lc.luzhengtang.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by DR on 2016/9/6.
 */
@HttpInlet(Conn.ORDERORDEREVA)
public class PostOrderEvaluate extends BaseAsyPost {
    //UID，订单号，是否匿名，评价详情，物流服务，发货速度，服务质量
    public String uid, ordersn, is_man, info, logistics, speed, serve;

    public PostOrderEvaluate(AsyCallBack asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected Object parser(JSONObject object) throws Exception {

        if (object.optString("status").equals("1")) {

            TOAST = "评价成功";

            return "1";

        } else {

            TOAST = "评价失败";

        }

        return null;

    }

//    public static class EvaluateInfo {
//
//        public List<EvaluateList> evaluateList = new ArrayList<>();
//
//    }
//
//    public static class EvaluateList {
//        //gid，商品名称，图片，数量，价格
//        public String gid, goodsname, picurl, num, price;
//
//    }

    @Override
    protected boolean skipSecret(String key) {
        return key.equals("info");
    }

}
